package cn.huolabao.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@ApiModel(value = "cn-huolabao-model-SysDept")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "sys_dept")
public class SysDept implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "")
    private Integer id;

    /**
     * 租户ID
     */
    @TableField(value = "tenant_id")
    @ApiModelProperty(value = "租户ID")
    private Integer tenantId;

    /**
     * 父主键
     */
    @TableField(value = "parent_id")
    @ApiModelProperty(value = "父主键")
    private Integer parentId;

    @TableField(value = "dept_name")
    @ApiModelProperty(value = "")
    private String deptName;

    /**
     * 排序
     */
    @TableField(value = "sort")
    @ApiModelProperty(value = "排序")
    private Integer sort;

    /**
     * 备注
     */
    @TableField(value = "descript")
    @ApiModelProperty(value = "备注")
    private String descript;

    /**
     * 是否已删除
     */
    @TableField(value = "is_delete")
    @ApiModelProperty(value = "是否已删除")
    private Integer isDelete;

    @TableField(exist = false)
    @JsonInclude(value = JsonInclude.Include.NON_EMPTY)
    List<SysDept> children;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_TENANT_ID = "tenant_id";

    public static final String COL_PARENT_ID = "parent_id";

    public static final String COL_DEPT_NAME = "dept_name";

    public static final String COL_SORT = "sort";

    public static final String COL_DESCRIPT = "descript";

    public static final String COL_IS_DELETE = "is_delete";
}